<%--
  Created by IntelliJ IDEA.
  User: lzy
  Date: 18-4-19
  Time: 下午2:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"/>
    <title>Paramter</title>
    <%-- 此处插入JavaScript脚本 --%>
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#commit").click(function () {
                //提交表单
                $.post({
                    url: "./addRole",
                    // 将JSON转换为字符串传递
                    data: $("form").serialize(),
                    // 成功后的方法
                    success: function (result) {
                    }
                });
            });
        });
    </script>
</head>
<body>
<form id="form">
    <table>
        <tr>
            <td>角色名称</td>
            <td>
                <input id="roleName" name="roleName" value="">
            </td>
        </tr>
        <tr>
            <td>备注</td>
            <td><input id="note" name="note"></td>
        </tr>
        <tr>
            <td></td>
            <td align="right"><input id="commit" type="button" value="提交"></td>
        </tr>
    </table>
</form>
</body>
</html>
